/**
 * Copyright 2010 Pavel Daniel Alexandru PFA
 * 
 * Licensed under the terms of the GNU Lesser General Public License version 3 
 * as published by the Free Software Foundation. You may obtain a copy of the
 * License at: http://www.gnu.org/copyleft/lesser.html
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations 
 * under the License. 
 */
package com.kobol.webclient.client.model;

import com.smartgwt.client.widgets.grid.ListGridRecord;

/**
 * @author Pavel Alexandru
 * 
 */
public class AccountRecord extends ListGridRecord {

    private static final String ICON = "icon";
    private static final String ACCOUNT_NAME = "accountName";
    private static final String MAIN_PHONE = "mainPhone";
    private static final String LOCATION = "location";
    private static final String PRIMARY_CONTACT = "primaryContact";
    private static final String EMAIL_PRIMARY_CONTACT = "emailPrimaryContact";

    public AccountRecord() {
    }

    public AccountRecord(String icon, String accountName, String mainPhone, String location, String primaryContact,
	    String emailPrimaryContact) {
	setIcon(icon);
	setAccountName(accountName);
	setMainPhone(mainPhone);
	setLocation(location);
	setPrimaryContact(primaryContact);
	setEmailPrimaryContact(emailPrimaryContact);
    }

    public void setIcon(String icon) {
	setAttribute(ICON, icon);
    }

    public void setAccountName(String accountName) {
	setAttribute(ACCOUNT_NAME, accountName);
    }

    public void setMainPhone(String mainPhone) {
	setAttribute(MAIN_PHONE, mainPhone);
    }

    public void setLocation(String location) {
	setAttribute(LOCATION, location);
    }

    public void setPrimaryContact(String primaryContact) {
	setAttribute(PRIMARY_CONTACT, primaryContact);
    }

    public void setEmailPrimaryContact(String emailPrimaryContact) {
	setAttribute(EMAIL_PRIMARY_CONTACT, emailPrimaryContact);
    }

    public String getIcon() {
	return getAttributeAsString(ICON);
    }

    public String getAccountName() {
	return getAttributeAsString(ACCOUNT_NAME);
    }

    public String getMainPhone() {
	return getAttributeAsString(MAIN_PHONE);
    }

    public String getLocation() {
	return getAttributeAsString(LOCATION);
    }

    public String getPrimaryContact() {
	return getAttributeAsString(PRIMARY_CONTACT);
    }

    public String getEmailPrimaryContact() {
	return getAttributeAsString(EMAIL_PRIMARY_CONTACT);
    }
}